<template>
	<view class="content">
		<header-box></header-box>
		<view class="card1">
			<view class="top flex-between">
				<view>Vibrabium</view>
				<view class="title">振金源</view>
				<view>第N赛季</view>
			</view>
			<view class="next flex-between">
				<view class="left flex">
					<image src="/static/home-card1-1.png" mode="widthFix"></image>
					<text>VDS:</text>
					<view>50,376,555.00</view>
				</view>
				<image src="/static/home-card1-2.png" mode="widthFix" class="right"></image>
			</view>
			<view class="bottom flex-between">
				<view class="left">
					<view>VDS-VOLLP地址：</view>
					<view>https://huaban.com/search</view>
				</view>
				<image src="/static/home-card1-3.png" mode="widthFix" class="right" @click="paste('https://huaban.com/search')"></image>
			</view>
		</view>
		<view class="card2 flex-between">
			<view class="card">
				<view class="flex top">
					<image src='/static/home-card2-1.png' mode="widthFix"></image>
					参与人数
				</view>
				<view class="h3">55555</view>
			</view>
			<view class="card">
				<view class="flex top">
					<image src='/static/home-card2-2.png' mode="widthFix"></image>
					V-KD存量
				</view>
				<view class="h3">55555</view>
			</view>
			<view class="card">
				<view class="top flex">
					<image src='/static/home-card2-2.png' mode="widthFix"></image>
					V-KD价格
				</view>
				<view class="h3">55555</view>
			</view>
		</view>
		<view class="card3">
			<view class="title flex-center">PRiDe公会排行榜</view>
			<view class="tabs flex-between">
				<view class="item1">序号</view>
				<view class="item2">工会名称</view>
				<view class="item3">人数</view>
				<view class="item4">VDS数量</view>
			</view>
			<view class='list-box'>
				<view class="list" :class="{active:showIndex == index}" v-for="(item,index) in 5" :key="index">
					<view class="item-box  flex-between" @click="showIndex = index">
						<view>TOP{{index+1}}</view>
						<view class="item2">彭博亿万富翁</view>
						<view>20000人</view>
						<view>1234567</view>
					</view>
				
					<view class="item-next flex-between" v-if="showIndex == index">
						<view class="left">
							<view class="name">会员推荐码</view>
							<view class="num">123456</view>
						</view>
						<view class="center">
							<view class="name">会员昵称</view>
							<view class="num">时刻保持清醒时刻保持清醒 </view>
						</view>
						<view class="right flex-center">
							加入
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 分配详情弹框 -->
		<view class="filter-box flex-center" v-if="showAlert">
			<view class="alert-box">
				<view class="title flex-center">分配详情</view>
				<view class="doc">
					此处是开发详情的文案，此处是开发详情的文案，此处是开发详详情的文案此处是开发详此处是开发详情的文案处是开发详情的文案，详情的文案此处是开发详此处是开发详情的文案处是开发详情的文案。
					此处是开发详情的文案，此处是开发详情的文案，此处是开发详详情的文案此处是开发详此处是开发详情的文案处是开发详情的文案，详情的文案此处是开发详此处是开发详情的文案处是开发详情的文案。
				</view>
			</view>
		</view>
		
		<footer-box tabIndex="0"/>
	</view>
</template>

<script>
	import HeaderBox from '@/components/headerBox.vue'
	import FooterBox from '@/components/footerBox.vue'
	import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy.js'
	export default {
		components:{
			HeaderBox,FooterBox
		},
		data() {
			return {
				showAlert:false,
				showIndex:-1
			}
		},
		onLoad() {

		},
		methods: {
			paste(value) {
				let content = value // 复制内容，必须字符串，数字需要转换为字符串
			   const result = h5Copy(content)
			   if (result === false) {
				 uni.showToast({
				   title:'不支持',
				 })
			   } else {
				 uni.showToast({
				   title:'复制成功',
				   icon:'none'
				 })
			   }
			}
		}
	}
</script>

<style scoped lang="less">
	.content {
		padding-bottom: 50rpx;
		.card1{
			height: 322rpx;
			background: url("/static/home-top-bg.png") no-repeat 0 0;
			background-size: 100% 100%;
			padding: 40rpx 30rpx 20rpx;
			box-sizing: border-box;
			margin-top: 40rpx;
			.top{
				position: relative;
				font-size: 30rpx;
				color: #ffffff;
				.title{
					position: absolute;
					font-family: HYk1gj;
					font-size: 44rpx;
					color: #ffffff;
					left:calc(50% - 66rpx);
					bottom:18rpx;
				}
			}
			.next{
				margin: 20rpx 0 40rpx;
				.left{
					color: #ffffff;
					image{
						width: 30rpx;
						height: 24rpx;
						position: relative;
						top:8rpx;
						margin-right: 10rpx;
					}
					text{
						font-size: 36rpx;
						position: relative;
						top:5rpx;
					}
					view{
						font-size: 52rpx;
					}
				}
				.right{
					width: 18rpx;
					height: 28rpx;
				}
			}
			.bottom{
				align-items: flex-end;
				.left{
					font-size: 30rpx;
					color: #ffffff;
				}
				.right{
						width: 32rpx;
						height: 32rpx;
				}
			}
		}
		.card2{
			margin: 25rpx 0;
			.card{
				width: 210rpx;
				height: 126rpx;
				background-color: #262d3c;
				border-radius: 12rpx;
				padding: 20rpx 25rpx;
				box-sizing: border-box;
				.top{
					font-size: 26rpx;
					color: #898ea3;
					image{
						width: 24rpx;
						height: 24rpx;
						margin-right: 10rpx;
					}
				}
				.h3{
					color:white;
					margin-top: 5rpx;
				}
			}
		}
		.card3{
			background-color: #262d3c;
			border-radius: 12rpx;
			min-height: 300rpx;
			overflow: hidden;
			.title{
				width: 368rpx;
				height: 68rpx;
				background: url("/static/home-card3-1.png") no-repeat 0 0 ;
				background-size: 100% 100%;
				margin: 40rpx auto 30rpx;
				font-size: 32rpx;
				color: #ffffff;
			}
			.tabs{
				padding: 0 30rpx;
				height: 64rpx;
				background-image: linear-gradient(0deg, 
					#81e1c6 0%, 
					#3df1be 50%,
					#3df1be 100%);
				color:white;
				font-size: 30rpx;
				color: #ffffff;
				view{
					width: 21%;
				}
				.item2{
					width: 28%;
				}
			}
			.list-box{
				padding: 0 30rpx;
				.list{
					border-bottom: 2rpx solid #3df1be;
					
					&:last-child{
						border:0;
					}
					&.active{
						border:0;
					}
					.item-box{
						height: 90rpx;
						font-size: 28rpx;
						color: #898ea3;
						view{
							width: 21%;
						}
						.item2{
							width: 28%;
						}
					}
					.item-next{
						height:90rpx;
						padding: 0 20rpx;
						background-color: #161a25;
						border-radius: 4rpx;
						.left,.center{
							position: relative;
							top:-5rpx;
						}
						.name{
							font-size: 20rpx;
							color: #898ea3;
							transform: scale(.8);
							position: relative;
							left:-10rpx;
							display: inline-block;
						}
						.num{
							font-size: 24rpx;
							color: #898ea3;
							
						}
						.center{
							.num{
								max-width:200rpx ;
								overflow:hidden;
								text-overflow:ellipsis;
								white-space:nowrap
							}
						}
						.right{
							width: 121rpx;
							height: 53rpx;
							background: url("/static/home-tuijian.png") no-repeat 0 0;
							background-size: 100% 100%;
							font-size: 26rpx;
							color: #ffffff;
						}
						
					}
					
				}
			}
		}
	}
	.filter-box{
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0,0,0,.8);
		z-index: 3;
		.alert-box{
			width: 608rpx;
			height: 339rpx;
			background: url("/static/home-alert-bg.png") no-repeat 0 0;
			background-size: 100% 100%;
			.title{
				text-align: center;
				font-size: 36rpx;
				color: #3df1be;
				height: 80rpx;
			}
			.doc{
				padding:0 20rpx;
				height: 230rpx;
				box-sizing: border-box;
				overflow-y: scroll;
				font-size: 26rpx;
				line-height: 40rpx;
				color: #898ea3;
				text-align: justify;
			}
		}
	}
</style>
